package com.lq.ecoldchain.ui.mine.user

import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.lq.ecoldchain.R
import com.lq.ecoldchain.base.BaseNavigator
import com.lq.ecoldchain.base.view.BaseActivity
import com.lq.ecoldchain.databinding.ActivityUserInfoBinding
import com.lq.ecoldchain.entity.UserInfoBean
import org.kodein.di.Kodein
import org.kodein.di.generic.bind
import org.kodein.di.generic.instance

/*
*2018/12/26 0026  17:35
*function by lq
*/
@Route(path = BaseNavigator.userActivity)
class UserActivity:BaseActivity<ActivityUserInfoBinding>(){
    @Autowired(name="data")
    @JvmField
    var data:UserInfoBean?=null

    override val kodein: Kodein = Kodein.lazy {
        extend(parentKodein)
        import(userKodeinModel)
        ARouter.getInstance().inject(this@UserActivity)
        bind<UserInfoBean>() with instance(data!!)
    }
    override val viewDelegate:  UserDelegate by instance()

    override val layoutId = R.layout.activity_user_info


    override fun initView() {
        binding.delegate = viewDelegate
        binding.user = data
        titleText("个人信息")
    }
}